#include "Bomberman.h"
#include "Include.h"


void bombermanInit(Bomberman *pBomberman)
{
	pBomberman->x=pBomberman->y=0;
}

void bombermanGauche(Bomberman *pBomberman, const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x-1, pBomberman->y))
		pBomberman->x--;
}

void bombermanDroite(Bomberman *pBomberman, const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x+1, pBomberman->y))
		pBomberman->x++;
}

void bombermanHaut(Bomberman *pBomberman, const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x, pBomberman->y-1))
		pBomberman->y--;
}

void bombermanBas(Bomberman *pBomberman, const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x, pBomberman->y+1))
		pBomberman->y++;
}

int bombermanGetX(const Bomberman *pBomberman)
{
	return pBomberman->x;
}

int bombermanGetY(const Bomberman *pBomberman)
{
	return pBomberman->y;
}

